<%@ page contentType="text/html; charset=UTF-8" %>

<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ca" lang="ca_ES">


    <head>
        <title>
            <s:text name="exuoc.nom.pseudonim"/>
        </title>

        <%-- Dades de la capçalera de la pàgina --%>
        <jsp:include page="/WEB-INF/jspf/metas.jsp"  flush="true" />
    </head>
<body>&nbsp;




<div id="principal">

    <%-- Capçalera del dipòsit --%>
    <jsp:include page="/WEB-INF/jspf/capsalera.jsp" flush="true"/>
    <big><big><big>
             <s:text name="exuoc.item.topten.titolpagina" /></big></big></big>
    <br /><br />
    <big><i> <s:text name="exuoc.item.topten.titolpagina" />
    </i></big>
    <s:if test="actionMessages.size()>0">
                <s:actionmessage />
    </s:if>
    <br/>


    <%-- COMENÇAMENT DEL CONTINGUT DE LA PÀGINA --%>

    <%-- llistat d'Items --%>
    <s:div>
        <s:div>
            <table summary="<s:text name='exuoc.item.topten.titolpagina'/>"
                   align="center" border="1" cellpadding="3" cellspacing="3"
                   height="25" width="737">
                <tbody>
                    <tr>
                        <th class="thMinAmplada" id="t1" bgcolor="#ffcccc">
                            <s:text name="exuoc.item.consulta.datapublicacio"/>
                        </th>
                        <th class="thAmplada" id="t2" bgcolor="#ffcccc">
                            <s:text name="exuoc.item.consulta.titol"/></th>
                        <th class="thMinAmplada" id="t3" bgcolor="#ffcccc">
                            <s:text name="exuoc.item.consulta.autor"/></th>
                        <th class="thMinAmplada" id="t4" bgcolor="#ffcccc">
                            <s:text name="exuoc.item.consulta.nconsultes"/></th>
                        <th class="thMinAmplada" id="t5" bgcolor="#ffcccc">
                            <s:text name="exuoc.item.consulta.public"/></th>
                        <s:if test="#session.isGestor==true || #session.isAdmin==true">
                        <th class="thMinAmplada" id="t6" bgcolor="#ffcccc">
                            <s:text name="exuoc.item.consulta.accions"/></th>
                        </s:if>
                    </tr>
                     <s:iterator value="llistaIt" status="llistaItemsStatus">
                            <s:url id="itemURL"  namespace="/items"
                                   action="consulta_Items">
                                <s:param name="idItemActual">
                                    <s:property value="id"/></s:param>
                            </s:url>
                    <tr <s:if test="#llistaItemsStatus.odd" >
                            class="FilaSenar"
                        </s:if>
                        <s:else>
                            class="FilaParell"
                        </s:else>
                        >
                        <td><s:property value="datapub"/></td>
                        <td><s:a  cssClass="link" href="%{itemURL}">
                                <s:property value="nom"/></s:a></td>
                        <td><s:property value="autor"/></td>
                        <td ><s:property value="visites"/></td>
                        <td>
                            <s:if test="privat==true" >
                                <img alt="Privat"
                                 src="/exuoc/gifs/ko.png" align="middle"
                                 height="25" width="25"
                                 title="<s:property value="!privat"/>"/>
                            </s:if>
                            <s:else>
                                <img alt="Privat"
                                 src="/exuoc/gifs/ok.png" align="middle"
                                 height="25" width="25"
                                 title="<s:property value="!privat"/>"/>
                            </s:else>
                        </td>
                        <s:if test="#session.isGestor==true || #session.isAdmin==true">
                        <td>


                            <s:url id="modificarItemURL"  namespace="/items"
                                   action="editar_Items">
                                <s:param name="idItemActual">
                                    <s:property value="id"/></s:param>
                            </s:url>

                            <s:a cssClass="link" href="%{modificarItemURL}">
                                <img alt="Modificar"
                                    src="/exuoc/gifs/modificar.png"
                                    align="middle" height="25" width="25"
                                    title="<s:text
                                  name='exuoc.item.consulta.item.modificar'/>"/>
                            </s:a>

                            <s:url id="eliminarItemURL"  namespace="/items"
                                   action="eliminar_Items">
                                <s:param name="idItemActual">
                                    <s:property value="id"/></s:param>
                            </s:url>
                            <s:a cssClass="link" href="%{eliminarItemURL}">
                            <img alt="Eliminar"
                                 src="/exuoc/gifs/cancel.png" align="middle"
                                 height="25" width="25"
                                 title="<s:text
                                   name='exuoc.item.consulta.item.eliminar'/>"/>
                            </s:a>

                        </td>
                        </s:if>
                    </tr>
                    </s:iterator>
                </tbody>
            </table>
        </s:div>
        <br />
    </s:div>
 

    <%-- Peu de la pàgina web --%>
    <jsp:include page="/WEB-INF/jspf/peu.jsp"  />

</div>
</body></html>